package com.sikaryofficial.backend.controller.information;

import com.sikaryofficial.backend.manager.information.ArticleCategoryManager;
import com.sikaryofficial.common.core.domain.R;
import com.sikaryofficial.common.core.web.controller.BaseController;
import com.sikaryofficial.system.api.model.infomation.ArticleCategoryDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 文章分类Controller
 *
 * @author qinjinyuan
 * @date 2024-04-10
 */
@RestController
@RequestMapping("/article/category")
@Api(tags = "资讯-文章分类")
public class ArticleCategoryController extends BaseController {
    @Autowired
    private ArticleCategoryManager articleCategoryManager;

    /**
     * 查询文章分类列表
     */
    @PostMapping("/list")
    @ApiOperation("文章分类列表| Subheadings")
    public R<List<ArticleCategoryDTO>> list() {
        return R.ok(articleCategoryManager.list());
    }
}
